
<!doctype html>
<html lang="en" class="fixed">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <title>联通用户资费管理系统</title>
    <link rel="apple-touch-icon" sizes="120x120" href="favicon/apple-icon-120x120.png">
    <link rel="icon" type="image/png" sizes="192x192" href="favicon/android-icon-192x192.png">
    <link rel="icon" type="image/png" sizes="32x32" href="favicon/favicon-32x32.png">
    <link rel="icon" type="image/png" sizes="16x16" href="favicon/favicon-16x16.png">
    <link rel="stylesheet" type="text/css" href="http://apps.bdimg.com/libs/bootstrap/3.3.4/css/bootstrap.css">
    <link rel="stylesheet" type="text/css" href="http://cdn.bootcss.com/font-awesome/4.6.0/css/font-awesome.min.css">
    <link rel="stylesheet" href="vendor/animate.css/animate.css">
    <link rel="stylesheet" href="vendor/toastr/toastr.min.css">
    <link rel="stylesheet" href="vendor/magnific-popup/magnific-popup.css">
    <link rel="stylesheet" href="stylesheets/css/style.css">
    <link rel="stylesheet" href="vendor/select2/css/select2.min.css">
    <link rel="stylesheet" href="vendor/select2/css/select2-bootstrap.min.css">
	<link href="JBox/plugins/Notice/jBox.Notice.css"  rel="stylesheet"/>
    <link href="JBox/plugins/Confirm/jBox.Confirm.css" rel="stylesheet" />
	<script type="text/javascript" src="javascripts/jquery.min.js"></script>
	<script type="text/javascript" src="javascripts/jquery.cookie.js" ></script>
	<script type="text/javascript" src="JBox/jBox.js"></script>
	<script type="text/javascript" src="JBox/plugins/Notice/jBox.Notice.js"></script>
	<script src="vendor/bootstrap/js/bootstrap.min.js"></script>
	<script src="vendor/nano-scroller/nano-scroller.js"></script>
	<script src="javascripts/examples/forms/advanced.js"></script>
	<script src="vendor/select2/js/select2.min.js"></script>
    <script>
    	var ugender="";
    	var uidno="";
    	var uid=-1;
    	var pid=-1;
    	
    	if($.cookie("UM")==null||$.cookie("UM")=="null"){
    		window.location="login.html";
    	}
    	
    	$(document).ready(function(){
    		$(".user-name").text($.cookie("UMN"));
    		$(".user-profile").text($.cookie("UMC"));
    		$(".user-photo img").attr("title",$.cookie("UMN"));
    		initCruise();
    		
    		$(".log-out").click(function(){
    			$.cookie("UM",null);
    			$.cookie("UMN",null);
    			$.cookie("UMC",null);
    			window.location="login.html";
    		});
    		
    		$(".btnCancel").click(function(){
    			$('#btnSave').attr('href','');
    		})
    		
    		$("#psearch").focusin(function(){
    			$("#puname").text("");
    			$("#pscore").text("");
    		});
				
    		
			$("#btnSave").unbind("click").bind("click",function(){
				var pcode=$.trim($("#psearch").val());    		
    			var bdate=$("#bdate").val();
    			var pcuid=$("#pcruiselist").val();
    			
	    		if(pcode==""){
	    			new jBox('Notice', {width: 240,height: 45,content: '请输入要查询的手机号！',autoClose: 2000,
						color: 'red',animation: {open: 'slide:right bottom',close: 'slide:top'},
						position: {x: ($(window).width()-240)/2,y: ($(window).height())/2}
					});
					return;
	    		}else if($("#puname").text()==""){
	    			new jBox('Notice', {width: 240,height: 45,content: '请点击查询验证号码信息！',autoClose: 2000,
						color: 'red',animation: {open: 'slide:right bottom',close: 'slide:top'},
						position: {x: ($(window).width()-240)/2,y: ($(window).height())/2}
					});
					return;
	    		}
	    		else if(bdate==null||bdate==""){
	    			new jBox('Notice', {width: 240,height: 45,content: '请选择漫游生效日期！',autoClose: 2000,
						color: 'red',animation: {open: 'slide:right bottom',close: 'slide:top'},
						position: {x: ($(window).width()-240)/2,y: ($(window).height())/2}
					});
					return;
	    		
	    	}else{
	    			$(this).attr("href","#myModal");
					$("#unamecon").text($("#puname").text());
					$("#ugendercon").text(ugender);
					$("#uidnocon").text(uidno);
					$("#pcodecon").text($("#psearch").val());
					$("#amount").text($("#pcruiselist option:selected").text());
					$("#amountdate").text($("#bdate").val());
					
					
						$("#btnConfirm").unbind("click").bind("click",function(){
							$.ajax({
				          	type: "post",
			                dataType: "json",
			                contentType: "application/json",                
				          	url: "UnicomService.asmx/AddCruise",
			                cache: false,
			                data: JSON.stringify({
			                	"PCRUISE":'是',
			                	"PCUID":pcuid,
			                	"PCRUISEBEGIN":bdate,
			                	"PID":pid
			                }),
			                beforeSend: function () {
			    				
			                },
			                success: function (result) {
								new jBox('Notice', {width: 240,height: 45,content: '办理成功！',autoClose: 2000,
									color: 'red',animation: {open: 'slide:right bottom',close: 'slide:top'},
									position: {x: ($(window).width()-240)/2,y: ($(window).height())/2}
								});
								setTimeout(function(){window.location.reload()},2000);
			           		},
			           		error: function (msg) { console.log(msg.responseText); }
			         		});
						});
					
	    		}
			});
			
						
    	});
    	
    	function initCruise(){
    		$.ajax({
	          	type: "post",
                dataType: "json",
                contentType: "application/json",                
	          	url: "UnicomService.asmx/GetAllCruise",
                cache: false,
                beforeSend: function () { },
                success: function (result) {
				var html="";
				for(var i=0;i<result.d.length;i++){
					html+="<option value='"+result.d[i].ID+"' >"+result.d[i].CUNAME+"</option>";	
				}	
				$("#pcruiselist").html(html);					
           		},
           		error: function (msg) { console.log(msg.responseText); }
         	});
    	}
    	
    	function searchUser(sear){
    		if($.trim(sear)!=""){
    			$.ajax({
	          	type: "post",
                dataType: "json",
                contentType: "application/json",                
	          	url: "UnicomService.asmx/GetTargetUserPhone",
                cache: false,
                data: JSON.stringify({"PCODE":sear}),
                beforeSend: function () { },
                success: function (result) {
					if(result.d.length>0){
						if(result.d[0].phoneinfo_PSTATUS=="保号"||result.d[0].phoneinfo_PSTATUS=="冻结"){
							new jBox('Notice', {width: 240,height: 45,content: '该号码状态异常，无法办理！',autoClose: 3000,
								color: 'red',animation: {open: 'slide:right bottom',close: 'slide:top'},
								position: {x: ($(window).width()-240)/2,y: ($(window).height())/2}
							});
						}else{
							$("#puname").text(result.d[0].userinfo_UNAME);
							$("#pcruise").text(result.d[0].cruise_CUNAME);
							$("#pcruisedesc").text("漫游内容：漫游地区"+result.d[0].cruise_CUAREA+"，时长："+result.d[0].cruise_CULAST+"日，包含流量："+result.d[0].cruise_CUFLOW+"M，每分钟通话"+result.d[0].cruise_CUTIMEPRICE+"元");
							if(result.d[0].phoneinfo_PCUID==0){
								$("#pcruisedesc").text("无描述");
							}
							ugender=result.d[0].userinfo_UGENDER;
							uidno=result.d[0].userinfo_UIDNO;
							pid=result.d[0].phoneinfo_ID;
							uid=result.d[0].userinfo_ID;
							cuid=result.d[0].phoneinfo_PCUID;
						}
					}else{
						alert("查无此号！");
					}
           		},
           		error: function (msg) { console.log(msg.responseText); }
         	});
    		}else{
    			new jBox('Notice', {width: 240,height: 45,content: '请输入要查询的手机号！',autoClose: 2000,
						color: 'red',animation: {open: 'slide:right bottom',close: 'slide:top'},
						position: {x: ($(window).width()-240)/2,y: ($(window).height())/2}
				});
				$("#psearch").focus();
    		}
    	}
    </script>
    <style>
		@media(max-width: 767px) {
			#btnSearch{
				margin-top: 15px;
				margin-left: 15px;
			}
		}
	</style>
</head>
<body>
	<div class="wrap">
    <div class="page-header">
        <div class="leftside-header">
            <div class="logo">
                <a href="index.html" class="on-click">
                    <img alt="logo" src="images/header-logo.png" height="50"/>
                </a>
            </div>
            <div id="menu-toggle" class="visible-xs toggle-left-sidebar" data-toggle-class="left-sidebar-open" data-target="html">
                <i class="fa fa-bars" aria-label="Toggle sidebar"></i>
            </div>
        </div>
        <div class="rightside-header">
            <div class="header-middle"></div>
            <div class="header-section" id="search-headerbox">
                <input type="text" name="search" id="search" placeholder="Search...">
                <i class="fa fa-search search" id="search-icon" aria-hidden="true"></i>
                <div class="header-separator"></div>
            </div>
            <div class="header-section hidden-xs" id="notice-headerbox">
                <div class="notice" id="messages-notice">
                    <i class="fa fa-comments-o" aria-hidden="true"></i>
                    <span><i class="fa fa-exclamation-circle" aria-hidden="true"></i></span>
                    <div class="dropdown-box basic">
                        <div class="drop-header ">
                            <h3><i class="fa fa-comments-o" aria-hidden="true"></i> 信息</h3>
                            <span class="number">1</span>
                        </div>
                        <div class="drop-content">
                            <div class="widget-list list-left-element">
                                <ul>
                                    <li>
                                        <a href="#">
                                            <div class="left-element"><img alt="John Doe" src="images/avatar_1.jpg" /></div>
                                            <div class="text">
                                                <span class="title">John Doe</span>
                                                <span class="subtitle">Lorem ipsum dolor sit.</span>
                                            </div>
                                        </a>
                                    </li>                                   
                                </ul>
                            </div>
                        </div>
                        <div class="drop-footer">
                            <a>查看所有信息</a>
                        </div>
                    </div>
                </div>
                <div class="header-separator"></div>
            </div>
            <div class="header-section" id="user-headerbox">
                <div class="user-header-wrap">
                    <div class="user-photo">
                        <img src="images/user-avatar.jpg" alt="" />
                    </div>
                    <div class="user-info">
                        <span class="user-name"></span>
                        <span class="user-profile"></span>
                    </div>
                    <i class="fa fa-plus icon-open" aria-hidden="true"></i>
                    <i class="fa fa-minus icon-close" aria-hidden="true"></i>
                </div>
                <div class="user-options dropdown-box">
                    <div class="drop-content basic">
                        <ul>
                            <li> <a href="pages_lock-screen.html"><i class="fa fa-lock" aria-hidden="true"></i> 锁定系统</a></li>
                            <li> <a href="pages_user-profile.html"><i class="fa fa-user" aria-hidden="true"></i> 个人信息</a></li>
                            <li><a href="#"><i class="fa fa-cog" aria-hidden="true"></i>系统设置</a></li>
                        </ul>
                    </div>
                </div>
            </div>
            <div class="header-separator"></div>
            <div class="header-section">
                <i class="fa fa-sign-out log-out" aria-hidden="true"></i>
            </div>
        </div>
    </div>

    <div class="page-body">
       <div class="left-sidebar">
            <div class="left-sidebar-header">
                <div class="left-sidebar-title">功能导航</div>
                <div class="left-sidebar-toggle c-hamburger c-hamburger--htla hidden-xs" data-toggle-class="left-sidebar-collapsed" data-target="html">
                    <span></span>
                </div>
            </div>
            <div id="left-nav" class="nano">
                <div class="nano-content">
                    <nav>
                        <ul class="nav" id="main-nav">
                            <li class="active-item"><a href="index.html"><i class="fa fa-home" aria-hidden="true">                            	
                            </i><span>主页</span></a></li>
                            <li >
                                <a href="newUser.html"><i class="fa fa-cubes" aria-hidden="true"></i><span>用户开户</span></a>                                
                            </li>
                            <li >
                                <a href="delUser.html"><i class="fa fa-pie-chart" aria-hidden="true"></i><span>用户销户</span></a>                                
                            </li>
                            <li class="has-child-item open-item">
                                <a><i class="fa fa-columns" aria-hidden="true"></i><span>业务办理</span></a>
                                <ul class="nav child-nav level-1">
                                    <li><a href="setMenu.html">资费套餐</a></li>
                                    <li><a href="setFlow.html">流量套餐</a></li>
                                    <li><a href="cruise.html">国际业务</a></li>
                                    <li><a href="lockPhoneCode.html">停机复机</a></li>
                                    <li><a href="changeUPWD.html">服务密码</a></li>
                                </ul>
                            </li>
                            <li class="has-child-item close-item">
                                <a><i class="fa fa-table" aria-hidden="true"></i><span>充值缴费</span></a>
                                <ul class="nav child-nav level-1">
                                    <li><a href="userRecharge.html">缴费/充值卡</a></li>
                                    <li><a href="scoreCharge.html">积分兑换</a></li>
                                </ul>
                            </li>
                            <li class="has-child-item close-item">
                                <a><i class="fa fa-files-o" aria-hidden="true"></i><span>系统管理</span></a>
                                <ul class="nav child-nav level-1">
                                    <li><a href="pages_lock-screen.html">锁定系统</a></li>
                                    <li><a href="pages_user-profile.html">个人信息</a></li>
                                    <li><a href="#">系统设置</a></li>
                                </ul>
                            </li>
                                </ul>
                            </li>
                        </ul>
                    </nav>
                </div>
            </div>
        </div>
        <div class="content">
            <div class="content-header">
                <div class="leftside-content-header">
                    <ul class="breadcrumbs">
                        <li><i class="fa fa-columns" aria-hidden="true"></i><a href="index.html">主页</a></li>
                        <li><a>国际漫游</a></li>
                    </ul>
                </div>
            </div>
            <div class="row animated fadeInUp">
                <div class="col-sm-12">
                    <h4 class="section-subtitle"><b>手机漫游信息</b></h4>
                    <div class="panel">
                        <div class="panel-content">
                            <div class="row">
                                <div class="col-md-12">
                                    <div class="form-horizontal form-stripe">
                                        <div class="form-group">
                                            
                                            <div class="col-sm-10">
                                                <input type="text" class="form-control" id="psearch" placeholder="要查询的电话号码">
                                            </div>
                                            <button onclick=searchUser($('#psearch').val()) class="col-sm-2 btn btn-warning" id="btnSearch" style="width:150px;color:white;margin-bottom:0px;border-radius: 6px;">查询</button>
                                        </div>
                                      	<div class="form-group">
                                           <div class="col-sm-6">
                                           	<label>开户人：</label>
                                           	<label id="puname" style="color: darkorange;"></label>
                                           </div>
                                            <div class="col-sm-6">
                                           	<label>当前漫游：</label>
                                           	<label id="pcruise" style="color: darkorange;"></label>
                                           </div>
                                        </div>
                                        <div class="form-group">
                                            <div class="col-sm-12">
                                           	<label>漫游描述：</label>
                                           	<label id="pcruisedesc" style="color: darkorange;"></label>
                                           </div>
                                        </div>
                                        <div class="form-group">
                                            <label for="placeholder" class="col-sm-12 control-label" style="text-align: left;margin-bottom: 15px;">办理漫游业务：</label>
                                            
                                           	<div class="col-sm-12">
                                                <select name="pcruise" id="pcruiselist" class="form-control select2-example-basic" style="width: 100%"></select> 
                                            </div>  
                                            <div class="col-sm-12" style="margin-top: 20px;">
                                            	<label for="placeholder" class="col-sm-1 control-label" style="text-align: left;">生效日期：</label>
                                            	<div class="col-sm-11">
                                                	<input type="date" class="form-control" id="bdate" >
                                            	</div>
                                            </div>
                                        </div>
                                        
                                            <label for="placeholder" class="col-sm-1 control-label" style="text-align: left;">变更说明：</label>
                                            <div class="col-sm-11">
                                                <p class="control-label" style="color: darkorange;text-align: left;">办理成功后，到开始漫游日期才生效</p>
                                            </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
 
                <div class="col-sm-12" style="text-align: center;">            
                    <a class="btn btn-wide btn-warning" id="btnSave" data-toggle="modal" >确 定</a>
                </div>
            </div>
        </div>
        <a href="#" class="scroll-to-top"><i class="fa fa-angle-double-up"></i></a>
    </div>
    <!-- Modal -->
        <div aria-hidden="true" aria-labelledby="myModalLabel" role="dialog" tabindex="-1" id="myModal" class="modal fade">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header" style="background: #ff6100;">
                        <button type="button" class="close btnCancel" data-dismiss="modal" aria-hidden="true" >&times;</button>
                        <h4 class="modal-title" style="color: #fff;">漫游信息确认</h4>
                    </div>
                    <div class="modal-body">
                        <div class="col-md-12">
                       		<div class="form-horizontal form-stripe">
	                            <div class="form-group" style="border-bottom: none;margin-bottom: 0;">
	                                <label for="placeholder" class="col-sm-3 control-label" style="color: #999;">用户姓名：</label>
	                                    <div class="col-sm-3">
	                                         <label id="unamecon" class="form-control" style="border: none;box-shadow: none;"></label>
	                                    </div>
	                                <label for="placeholder" class="col-sm-3 control-label"  style="color: #999;">用户性别：</label>
	                                    <div class="col-sm-3" class="form-control-feedback">
	                                         <label id="ugendercon" class="form-control" style="border: none;box-shadow: none;"></label>
	                                    </div>
	                            </div>
	                            <div class="form-group" style="border-bottom: none;;margin-bottom: 0;">
	                                <label for="placeholder" class="col-sm-3 control-label" style="color: #999;">身份证号：</label>
	                                    <div class="col-sm-9">
	                                         <label id="uidnocon" class="form-control" style="border: none;box-shadow: none;"></label>
	                                </div>	                                
	                            </div>
	                            <div class="form-group" style="border-bottom: none;;margin-bottom: 0;">
	                                <label for="placeholder" class="col-sm-3 control-label"  style="color: #999;">办理号码：</label>
	                                    <div class="col-sm-9">
	                                         <label id="pcodecon" class="form-control" style="border: none;box-shadow: none;"></label>
	                                </div>	                                
	                            </div>	                          
	                          
	                            <div class="form-group" style="height: 50px;line-height: 30px;margin-bottom: 0;">
	                                <label for="placeholder" class="col-sm-3 control-label" >漫游业务：</label>
	                                    <div class="col-sm-9">
	                                         <label id="amount" class="form-control" style="border: none;box-shadow: none;text-align: right;color: orangered;font-size: 14pt;"></label>
	                                         
	                                </div>	
	                                <label for="placeholder" class="col-sm-3 control-label" >生效日期：</label>
	                                    <div class="col-sm-9">
	                                         <label id="amountdate" class="form-control" style="border: none;box-shadow: none;text-align: right;color: orangered;font-size: 14pt;"></label>
	                                         
	                                </div>	
	                            </div>
                            </div>
                        </div>
                    </div>
                    <div class="modal-footer"  style="border: none;">
                        <button data-dismiss="modal" class="btn btn-default btnCancel"  type="button">取消</button>
                        <button  class="btn btn-primary" type="button" id="btnConfirm" >确认变更</button>
                    </div>
                </div>
            </div>
        </div>
        <!-- modal -->
</div>
</body>

	<script src="javascripts/template-script.min.js"></script>
	<script src="javascripts/template-init.min.js"></script>
</html>
